---
title: 自定义钱包列表
description: 定制钱包列表
---

# 自定义钱包列表

## 定制钱包列表

您可以从`'@rainbow-me/rainbowkit/wallets'`中导入各个钱包，同时使用`connectorsForWallets`函数来构建自己的钱包列表和所需连接器。 这样，您可以自由控制显示哪些钱包以及显示的顺序。

例如，您可以选择仅显示Rainbow和通用的Fallback钱包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  rainbowWallet,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Recommended',
      wallets: [rainbowWallet, walletConnectWallet],
    },
  ],
  {
    appName: 'My RainbowKit App',
    projectId: 'YOUR_PROJECT_ID',
  }
);
```

然后，您可以将您的连接器传递给`wagmi`的 `createConfig`。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { createConfig } from 'wagmi';

const connectors = connectorsForWallets(/* ... */);

const config = createConfig({
  connectors,
  {/* Wagmi config */}
});

const queryClient = new QueryClient();

const App = () => (
  <WagmiProvider config={config}>
    <QueryClientProvider client={queryClient}>
      <RainbowKitProvider {...etc}>
        {/* Your App */}
      </RainbowKitProvider>
    </QueryClientProvider>
  </WagmiProvider>
);
```

### 内置钱包

以下钱包通过`wallet`对象提供。

#### 通用钱包

以下钱包限定于通用连接方式，而非特定应用。因此，建议始终包含这些钱包。

##### WalletConnect

这是为没有在列表中提供的基于 WalletConnect 的钱包设计的备选钱包选项。

**建议您总是把这个钱包包含在列表中，以确保支持所有基于 WalletConnect 的钱包。**

```tsx
import { walletConnectWallet } from '@rainbow-me/rainbowkit/wallets';
```

##### 注入式钱包

这是为存在`window.ethereum`但未被列表中的其他钱包提供的情境设计的备选钱包选项。当不需要备选，或没有可用注入钱包时，此钱包将自动从列表中隐藏。

**建议您始终在列表中包含此钱包，以确保支持所有注入的钱包。**

```tsx
import { injectedWallet } from '@rainbow-me/rainbowkit/wallets';
```

##### Safe (Gnosis Safe)

对于支持Safe Apps的dApps，以便用户可以轻松地连接到他们的Safe保险库或多重签名，包括 `safeWallet`选项以实现自动连接。 Safe选项仅在Safe Wallet浏览器环境中出现。

```tsx
import { safeWallet } from '@rainbow-me/rainbowkit/wallets';
```

### 特定钱包

以下钱包是通过`wallet`对象提供的（按字母顺序排列）。

#### 1inch Wallet

```tsx
import { oneInchWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Backpack

```tsx
import { backpackWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 基本账户（原 Coinbase Wallet）

此钱包连接器支持基本账户，Coinbase Smart Wallet 的演变。它提供无缝的身份验证和增强功能，如子账户和支出权限。

配置选项与[Base Account SDK 参考](https://docs.base.org/base-account/reference/core/createBaseAccount)保持一致。

```tsx
import { baseAccount } from '@rainbow-me/rainbowkit/wallets';

// Configure attribution (choose one approach)
baseAccount.preference = {
  attribution: { auto: true }, // Smart Wallet generates origin-based identifier
};

// Or use custom attribution
baseAccount.preference = {
  attribution: { dataSuffix: '0x1234567890abcdef' }, // 16-byte hex identifier
};

// Configure sub-accounts
baseAccount.subAccounts = {
  creation: 'on-connect', // or 'manual'
  defaultAccount: 'sub', // or 'universal'
  funding: 'spend-permissions', // or 'manual'
};

// Configure paymaster URLs for gasless transactions
baseAccount.paymasterUrls = {
  [base.id]: 'https://api.developer.coinbase.com/rpc/v1/base/...',
};
```

#### BeraSig

```tsx
import { berasigWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Best Wallet

```tsx
import { bestWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bifrost 钱包

```tsx
import { bifrostWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Binance Web3 Wallet

```tsx
import { binanceWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bitget

```tsx
import { bitgetWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bitski

```tsx
import { bitskiWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bitverse

```tsx
import { bitverseWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bloom Wallet

```tsx
import { bloomWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Brave Wallet

```tsx
import { braveWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bybit Wallet

```tsx
import { bybitWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Coin98 Wallet

```tsx
import { coin98Wallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Compass Wallet

```tsx
import { compassWallet } from '@rainbow-me/rainbowkit/compassWallet';
```

#### Core

```tsx
import { coreWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### CTRL 钱包

```tsx
import { ctrlWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Dawn Wallet

```tsx
import { dawnWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Enkrypt Wallet

```tsx
import { enkryptWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### FoxWallet

```tsx
import { foxWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Frame Wallet

```tsx
import { frameWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Frontier Wallet

```tsx
import { frontierWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Gate Wallet

```tsx
import { gateWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 双子座钱包

这个智能钱包连接器通过密钥提供无缝验证，无需下载、扩展或 API 密钥，使用现成的系统即可工作。

`appName` 参数是标识 dApp 所必需的，`appIcon` 是可选的，用于品牌化您的连接体验。

```tsx
import { geminiWallet } from '@rainbow-me/rainbowkit/wallets';

const gemini = geminiWallet({
  appName: 'My App',
  appIcon: 'https://my-app.com/logo.png', // Optional
});
```

#### imToken

```tsx
import { imTokenWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### ioPay Wallet

```tsx
import { iopayWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kaia Wallet

```tsx
import { kaiaWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kaikas

```tsx
import { kaikasWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kraken Wallet

```tsx
import { krakenWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kresus Wallet

```tsx
import { kresusWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Ledger Live

```tsx
import { ledgerWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Magic Eden Wallet

```tsx
import { magicEdenWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### MetaMask

```tsx
import { metaMaskWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### MEW钱包

```tsx
import { mewWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Nova Wallet

```tsx
import { novaWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### OKX Wallet

```tsx
import { okxWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Omni

```tsx
import { omniWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### OneKey

```tsx
import { oneKeyWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### ParaSwap

```tsx
import { paraSwapWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Phantom

```tsx
import { phantomWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 波尔图

```tsx
import { portoWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Rabby Wallet

```tsx
import { rabbyWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Rainbow

```tsx
import { rainbowWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Ramper Wallet

```tsx
import { ramperWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 准备好

```tsx
import { readyWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Ronin钱包

```tsx
import { roninWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Safeheron

```tsx
import { safeheronWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Taho

```tsx
import { tahoWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Talisman

```tsx
import { talismanWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Tokenary

```tsx
import { tokenaryWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### TokenPocket

```tsx
import { tokenPocketWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Trust钱包

```tsx
import { trustWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Uniswap钱包

```tsx
import { uniswapWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Valora

```tsx
import { valoraWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Wigwam

```tsx
import { wigwamWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### xPortal

```tsx
import { xPortalWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Zerion

```tsx
import { zerionWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### ZilPay

```tsx
import { zilPayWallet } from '@rainbow-me/rainbowkit/wallets';
```

### 示例

#### 排序

这里有一些显示不同钱包，以不同顺序的例子。

显示MetaMask和一般的备选钱包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  metaMaskWallet,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Recommended',
      wallets: [metaMaskWallet, walletConnectWallet],
    },
  ],
  { appName: 'RainbowKit App', projectId: 'YOUR_PROJECT_ID' },
);
```

显示Rainbow, MetaMask和Base账户以及一般的备选钱包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  rainbowWallet,
  metaMaskWallet,
  baseAccount,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Suggested',
      wallets: [
        rainbowWallet,
        metaMaskWallet,
        baseAccount,
        walletConnectWallet,
      ],
    },
  ],
  { appName: 'RainbowKit App', projectId: 'YOUR_PROJECT_ID' },
);
```

> 提醒：`wallets`数组的顺序定义了钱包在UI中显示的顺序。

#### 多个组

您可以使用 `groupName` 键来命名不同的钱包组。如果您希望向用户沟通推荐哪些钱包以及其他可能的钱包，这非常有用。

推荐Rainbow和MetaMask，但也提供Base账户以及一般的备选钱包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  rainbowWallet,
  metaMaskWallet,
  baseAccount,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Recommended',
      wallets: [rainbowWallet, metaMaskWallet],
    },
    {
      groupName: 'Others',
      wallets: [baseAccount, walletConnectWallet],
    },
  ],
  { appName: 'RainbowKit App', projectId: 'YOUR_PROJECT_ID' },
);
```
